<template>
  <HerinContainer
    class="MainCoal-box"
    :delay="1"
    direction="Left"
    title="掘进人员监测"
  >
    <!-- tab按钮 -->
    <div slot="tab" class="MainCoal-box-tab">
      <div
        v-for="(item, i) in titletab"
        :key="i"
        :class="['btn', isbtn === item ? 'isbtn' : '']"
        @click="clickTitleTab(item)"
      >
        {{ item }}
      </div>
    </div>
    <!-- 内容区 -->
    <div slot="content" class="MainCoal-box-content">
      <Statistics v-if="isbtn === '统计'"></Statistics>
      <ListsVue v-else></ListsVue>
    </div>
  </HerinContainer>
</template>

<script>
import HerinContainer from '@/components/HerinContainer';
import Statistics from './Statistics.vue';
import ListsVue from './Lists.vue';
export default {
  components: {
    HerinContainer,
    Statistics,
    ListsVue
  },
  data() {
    return {
      titletab: ['统计', '列表'],
      isbtn: '统计',
      orderKeys: ['平段', '尖峰段', '谷段', '高峰段'],
      lists: [
        {
          'alarmCount': 70,
          'level1': 'COAL_FLOW',
          'level1Desc': '平段'
        },
        {
          'alarmCount': 343,
          'level1': 'ENVIRONMENT',
          'level1Desc': '尖峰段'
        },
        {
          'alarmCount': 77,
          'level1': 'WATER_DRAIN',
          'level1Desc': '谷段'
        },
        {
          'alarmCount': 93,
          'level1': 'WATER_DRAIN',
          'level1Desc': '高峰段'
        }
      ]
    };
  },
  computed: {
  },
  // 初始赋值
  mounted() {
  },
  methods: {
    clickTitleTab(item) {
      this.isbtn = item;
    }
  }
};
</script>

<style lang='scss' scoped>
.MainCoal-box {
  &-tab {
    display: flex;
    .btn {
      @include btn;
    }
    .isbtn {
      background-color: rgba(0, 228, 255, 0.2);
      color: $cyan;
    }
  }
}
</style>
